#!/bin/bash

cd $(dirname $0)
mkdir -p bin
cp shell/guishell_sh bin
cp frontend/guishell bin

if [ -f term/debug/guishell_term ]; then
	cp term/debug/guishell_term bin
elif [ -f term/release/guishell_term ]; then
	cp term/release/guishell_term bin
else
	cp term/guishell_term bin
fi

cd bin
gdb --eval-command=run guishell_term*

